# tcp client practice

import socket

socket_client = socket.socket(socket.AF_INET, socket.SOCK_STREAM)

server_ip = '3.3.4.37'
server_port = 2222

socket_client.connect((server_ip, server_port))

send_msg = b'I am tcp client.'

socket_client.send(send_msg)

receive_data = socket_client.recv(1024)

print(f'receive a message:{receive_data.decode("utf-8")}')

socket_client.close()


